Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine TCPMux memory usage #653

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Refine TCPMux memory usage #653

merged 1 commit into from
Feb 22, 2024

Conversation

cnderrauber
Copy link
Member

@cnderrauber cnderrauber commented Feb 22, 2024

Reduce read buf of first stun message.
Add timeout to read first message to clean interrupted connection earlier.
Add alive duration for gather to access connection created from stun bind, avoid connection leak from the malicious client.

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (ab18a94) 78.60% compared to head (7b5b502) 78.85%.

Files Patch % Lines
tcp_mux.go 72.22% 6 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
+ Coverage   78.60%   78.85%   +0.24%     
==========================================
  Files          42       42              
  Lines        4394     4431      +37     
==========================================
+ Hits         3454     3494      +40     
+ Misses        725      721       -4     
- Partials      215      216       +1     
Flag Coverage Δ
go 78.85% <80.00%> (+0.24%) ⬆️
wasm 23.23% <80.00%> (+0.87%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!!

Reduce read buf of first stun message.
Add timeout to read first message to clean interrupted
connection earlier.
Add alive duration for gather to access connection created
from stun bind, avoid connection leak from malicious client.
@cnderrauber cnderrauber merged commit cb8a47a into master Feb 22, 2024
14 checks passed
@cnderrauber cnderrauber deleted the refine_tcpmux branch February 22, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants